package com.chenfan.mcn.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.chenfan.mcn.extension.log.FieldDesc;
import com.chenfan.mcn.extension.log.FieldTypeEnum;
import com.chenfan.common.extension.validation.groups.Modify;
import com.chenfan.mcn.model.base.BaseSaveEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author tangwei
 * Date:     2021/1/26 18:35
 * Description: 执行单-执行反馈
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("excute_feedback")
public class ExcuteFeedback extends BaseSaveEntity {

    private static final long serialVersionUID = 7383292262265991381L;

    /**
     *  执行单主键id
     */
    private Long excutionOrderId;

    /**
     * 执行单编号
     */
    private String excutionOrderCode;

    /**
     * 发布链接
     */
    @NotBlank(message = "发布链接不能为空", groups = {Modify.class})
    @FieldDesc(value = "发布链接")
    private String publishUrl;

    /**
     * 发布截图
     */
    @NotBlank(message = "发布截图不能为空", groups = {Modify.class})
    @FieldDesc(value = "发布截图", fieldType = FieldTypeEnum.IMAGE)
    private String publishImg;

    /**
     * 实际发布日期
     */
    @NotNull(message = "实际发布日期不能为空", groups = {Modify.class})
    @FieldDesc(value = "实际发布日期", format = "yyyy-MM-dd")
    private Date realPublishDate;

    /**
     * 阅读量
     */
    @FieldDesc(value = "阅读量")
    private Integer readQuantity;

    /**
     * 互动量
     */
    @FieldDesc(value = "互动量")
    private Integer interactQuantity;

    /**
     * 播放量
     */
    @FieldDesc(value = "播放量")
    private Integer playQuantity;

    /**
     *  转化金额
     */
    @FieldDesc(value = "转化金额")
    private BigDecimal conversionAmount;

}